<?php

require_once 'init.inc';
require_once 'cf/captcha.inc';

$page = new Page(11);
$title = $page->title();
$keywordsOb = new KeyWords('cf_pages', 'id', $page->id());
$keywords = $keywordsOb->words();


$code = Captcha::generateCode(5);
session::set('code',$code);

$send = false;
$err = false;
if ($par->exist('err'))
{
	$err = true;
}
else if($par->exist('ok'))
{
	$send = true;
}

$name = '';
$email = '';
$msg = '';

if (session::has('lastSendMsgParams'))
{
	$lastSendMsgParams = session::get('lastSendMsgParams');
	$name = $lastSendMsgParams['name'];
	$email = $lastSendMsgParams['email'];
	$msg = $lastSendMsgParams['msg'];
}

session::del('lastSendMsgParams');

assignTemplateVars('page','title','keywords','code','send','err','name','email','msg');
display('advertising');
?>